﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Practices.Unity;
using SISGEZATBZVisual.BusinessEntities;
using SISGEZATBZVisual.Service;
using System.Web.ModelBinding;

namespace SISGEZATBZVisual.Web.Maestros
{
    public partial class Matriculas : System.Web.UI.Page
    {

        [Dependency]
        public IMatriculaService MatriculaService { get; set; }
        [Dependency]
        public IAñoAcademicoService AñoAcademicoService { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }



        public IEnumerable<Matricula> GetMatriculas([Control("txtAlumno")] string alumno, [Control("ddlAñoAcademico")] Int32? idAñoAcademico)
        {


            
            IEnumerable<Matricula> matriculas = new List<Matricula>();

            if (idAñoAcademico.HasValue)
            {
                return MatriculaService.GetMatriculas(alumno, idAñoAcademico);    
            }


            return matriculas.AsEnumerable();

        }

        public IEnumerable<AñoAcademico> GetAllAñosAcademicos()
        {
            return AñoAcademicoService.GetAllAñosAcademicos();
        }

    }
}